INSTALL_PATH=~/soft
mkdir -p ${INSTALL_PATH}
cd ${INSTALL_PATH}

# 判断是否存在，不存在则去下载
if [ ! -d "kibana" ]; then
    wget https://artifacts.elastic.co/downloads/kibana/kibana-7.12.0-linux-x86_64.tar.gz
    tar -xzf kibana-7.12.0-linux-x86_64.tar.gz
    mv kibana-7.12.0-linux-x86_64 kibana
    rm kibana-7.12.0-linux-x86_64.tar.gz
fi
cd kibana
mkdir -p log
echo "
elasticsearch.username: "elastic"
elasticsearch.password: "elastic"
elasticsearch.hosts: http://127.0.0.1:9200
pid.file: /home/xieqihui/soft/kibana/pid

i18n.locale: "zh-CN"

xpack.graph.enabled: true
xpack.security.enabled: true
xpack.encryptedSavedObjects.encryptionKey: "yrujidnR34342RRTrFF298924RGeglerltoetk34olflfowrjo"
monitoring.kibana.collection.enabled: false
">config/kibana.yml
echo "kibana.yml 配置完成"

